package com.springboot.hibernate.service.impl;

import com.springboot.hibernate.dao.IMenuDao;
import com.springboot.hibernate.entity.Menu;
import com.springboot.hibernate.service.IMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import com.springboot.hibernate.dao.IAdminDao;
import com.springboot.hibernate.service.IAdminService;

import java.util.List;

/**
 * 描 述: 描述
 *
 * @author 南瓜
 * @date: 2019/4/8
 */
@Service
public class MenuServiceImpl implements IMenuService {

    @Autowired
    private IMenuDao menuDao;

    public void save(Menu menu){
        menuDao.save(menu);
    }

    @Override
    public List<Menu> findPage(Pageable pageable) {
        return menuDao.findAll();
    }
}
